home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-04-14 | 6.4 KB | 243 lines | [TEXT/KAHL] |
- $$Loop ModalDialogs
- $$Message User Modal Dialog, u:$Worksheet.name$.h
-
- $$File u:$Worksheet.name$.h
- /* $Worksheet.name$ Handle this dialog */
- /* $CopyRight$ */
-
- /* File name: $Worksheet.name$.h
- Function: Handle this modal dialog.
-
- This dialog is called when:
-
- History: $Date$ Original by $Author$
-
- */
-
- /* ======================================================= */
- /* ======================================================= */
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- /* Init the modal dialog */
- void D_Init_$Worksheet.name$(void);
-
- /* Hook into the modal dialog filter routine */
- Boolean D_Filter_$Worksheet.name$(DialogPtr theDialog, EventRecord *theEvent, short *itemHit);
-
- /* Refresh the modal dialog */
- void D_Refresh_$Worksheet.name$(DialogPtr theDialog);
-
- /* Setup the modal dialog */
- void D_Setup_$Worksheet.name$(DialogPtr theDialog);
-
- /* Hit in the modal dialog */
- void D_Hit_$Worksheet.name$(DialogPtr theDialog, short *itemHit, Boolean *ExitDialog);
-
- /* Exit the modal dialog */
- void D_Exit_$Worksheet.name$(DialogPtr theDialog);
-
- #ifdef __cplusplus
- }
- #endif
-
- /* ======================================================= */
- /* ======================================================= */
- $$CloseFile
- $$Message User Modal Dialog, u:$Worksheet.name$.c
-
- $$File u:$Worksheet.name$.c
- /* $Worksheet.name$ Handle this dialog */
- /* $CopyRight$ */
-
- /* File name: $Worksheet.name$.c
- Function: Handle this modal dialog.
-
- This dialog is called when:
-
- History: $Date$ Original by $Author$
-
- */
-
- #include "mmCommon$Prototype.name$.h" /* Common */
- #include "Common$Prototype.name$.h" /* Common */
-
- #include "$Worksheet.name$.h" /* Users specific file */
-
- /* ======================================================= */
- /* ======================================================= */
-
- /* Routine: D_Init_$Worksheet.name$ */
- /* Purpose: This routine is called while when the program is first run */
- /* This is used for onetime initialization */
-
- void D_Init_$Worksheet.name$(void)
- {
- }
-
- /* ======================================================= */
-
- /* Routine: D_Filter_$Worksheet.name$ */
- /* Purpose: This routine is called while inside of the Modal Dialog filter */
-
- Boolean D_Filter_$Worksheet.name$(DialogPtr theDialog,EventRecord *theEvent,short *itemHit)
- {
- Boolean Filter_$Worksheet.name$;
-
- Filter_$Worksheet.name$ = false; /* Let the modal routine handle it */
- return(Filter_$Worksheet.name$);
- }
-
- /* ======================================================= */
-
- /* Routine: D_Refresh_$Worksheet.name$ */
- /* Purpose: Refresh the modal dialog */
-
- void D_Refresh_$Worksheet.name$(DialogPtr theDialog)
- {
- }
-
- /* ======================================================= */
-
- /* Routine: D_Setup_$Worksheet.name$ */
- /* Purpose: Setup the modal dialog */
-
- void D_Setup_$Worksheet.name$(DialogPtr theDialog)
- {
- }
-
- /* ======================================================= */
-
- /* Routine: D_Hit_$Worksheet.name$ */
- /* Purpose: Hit in the modal dialog */
-
- void D_Hit_$Worksheet.name$(DialogPtr theDialog,short *itemHit,Boolean *ExitDialog)
- {
- short DType; /* Type of dialog item */
- Handle DItem; /* Handle to the dialog item */
- ControlHandle CItem; /* Control handle */
- short theSelection; /* tool selection */
-
-
- $$Loop Control.type = Button
- $$if Control.Default
- /* This is the default selection, when RETURN is pressed. */
- $$endif
- if (*itemHit == ResD_$Control.name$) /* Handle the Button, $Control.FullName$, being pressed */
- {
- }
-
- $$EndLoop Control.type
- $$Loop Control.type = Checkbox
- if (*itemHit == ResD_$Control.name$) /* Handle the checkbox, $Control.FullName$, being pressed */
- {
- }
-
- $$EndLoop
- $$Loop Control.type = Radio
- if (*itemHit == ResD_$Control.name$) /* Handle the radio, $Control.FullName$, being pressed */
- {
- }
-
- $$EndLoop
- $$Loop Control.type = Icon
- $$if Control.NonGraphic
- if (*itemHit == ResD_$Control.name$) /* Handle the Icon, $Control.FullName$, being pressed */
- {
- }
-
- $$endif Control.NonGraphic
- $$EndLoop
- $$Loop Control.type = Picture
- $$if Control.NonGraphic
- if (*itemHit == ResD_$Control.name$) /* Handle the Picture, $Control.FullName$, being pressed */
- {
- }
-
- $$endif Control.NonGraphic
- $$EndLoop
- $$Loop Control.type = UButton
- if (*itemHit == ResD_$Control.name$) /* Handle the user plugin button, $Control.FullName$, being pressed */
- {
- }
-
- $$EndLoop
- $$Loop Control.type = UToggle
- if (*itemHit == ResD_$Control.name$) /* Handle the user plugin toggle, $Control.FullName$, being pressed */
- {
- }
-
- $$EndLoop
- $$Loop Control.type = HotRect
- $$if Control.HotSpot
- if (*itemHit == ResD_$Control.name$) /* Handle the HotSpot, $Control.FullName$, being pressed */
- {
- }
-
- $$endif Control.HotSpot
- $$EndLoop
- $$Loop Control.type = Sicn
- $$if Control.NonGraphic
- if (*itemHit == ResD_$Control.name$) /* Handle the Sicn, $Control.FullName$, being pressed */
- {
- }
-
- $$endif Control.NonGraphic
- $$EndLoop
- $$Loop Control.type = Popup
- if (*itemHit == ResD_$Control.name$) /* Handle the Popup, $Control.FullName$, being pressed */
- {
- GetDItem(theDialog,ResD_$Control.name$,&DType,&DItem,&tempRect);/* Get item information */
- CItem = (ControlHandle)DItem;
- theSelection = GetCtlValue (CItem); /* Get the Popup selection */
- switch (theSelection) /* Select correct item */
- {
- $$Loop PopupItems
- case $Control.PopupID$: /* for $Control.PopupName$ */
- break;
- $$EndLoop
-
- default: /* allow other buttons, trap for debug */
- break; /* end of otherwise */
- } /* end of switch */
- }
-
- $$EndLoop
- $$Loop Control.type = Palette
- if (*itemHit == ResD_$Control.name$) /* Handle the Palette, $Control.FullName$, being pressed */
- {
- GetDItem(theDialog,ResD_$Control.name$,&DType,&DItem,&tempRect);/* Get item information */
- CItem = (ControlHandle)DItem;
- theSelection = GetCtlValue (CItem); /* Get the Palette selection */
- switch (theSelection) /* Select correct item */
- {
- $$Loop PaletteItems
- case $Control.PaletteID$: /* Row $Control.Row$, Column $Control.Column$ */
- break;
- $$EndLoop
-
- default: /* allow other buttons, trap for debug */
- break; /* end of otherwise */
- } /* end of switch */
- }
-
- $$EndLoop
- }
-
- /* ======================================================= */
-
- /* Routine: D_Exit_$Worksheet.name$ */
- /* Purpose: Exit the modal dialog */
-
- void D_Exit_$Worksheet.name$(DialogPtr theDialog)
- {
-
- }
-
- /* ======================================================= */
- /* ======================================================= */
- $$CloseFile
- $$EndLoop
-